# -*- coding: utf-8 -*-
#获取master.properties文件里信息给前台相关路由
from flask import jsonify, request
import tools.globalvar as globalvar
from webapp.config import Config
from tools.OperationError import OperationError

def get_salerrems():
    '''
    获取营业员信息
    :return:
    '''
    res={}
    try:
        salers = globalvar.get_valuebykey(Config.KEY_SALERS, [])
        res["code"]=0
        res["data"]=salers
        res["message"]=""
        return jsonify(res)
    except Exception as e:
        res["code"]=-1
        res["data"]=[]
        res["message"]=e.__str__()
        return jsonify(res)